To improve performance, some computer systems execute multiple threads concurrently. Generally, before a thread accesses a shared resource, it acquires a lock of the shared resource. In situations where the shared resource is a data structure stored in memory, all threads that are attempting to access the same resource may serialize the execution of their operations in light of mutually exclusivity provided by the locking mechanism. This may be detrimental to system performance and may cause program failures, e.g., due to deadlock bugs.
To reduce performance loss resulting from utilization of locking mechanisms, some computer systems may use transactional memory. Transactional memory generally refers to a synchronization model that allows multiple threads to concurrently access a shared resource without utilizing a locking mechanism.